import {mainEchart} from '../index';

export default class newDemandBarTemplate extends mainEchart {
    defaultOption = {
        tooltip: {
            show: true,
            backgroundColor: "rgba(0,0,0,.51)",
            borderWidth: 0,
            padding: 20,
            trigger: 'axis',
            axisPointer: {
                type: 'line'
            },
            textStyle: {
                color: "#B7BCBB",
            },
        },
        xAxis: {
            type: "category",
            axisLine: {
                show: false,
            },
            axisTick: {
                show: false,
            },
            axisLabel: {
                color: 'rgba(240,240,240,0.7)',
            },
            splitLine: {
                lineStyle: {
                    color: "rgba(238,238,238, .1)",
                },
            },
            boundaryGap: true,
        },
        yAxis: {
            type: "value",
            axisLine: {
                show: false,
            },
            axisTick: {
                show: false,
            },
            axisLabel: {
                color: 'rgba(240,240,240,0.7)',
            },
            nameTextStyle: {
                color: 'rgba(240,240,240,0.7)',
            },
            splitLine: {
                lineStyle: {
                    color: "rgba(238,238,238, .1)",
                },
            },
            splitNumber: 3,
        },
        grid: {
            top: 0,
            left: 0,
            right: 0,
            bottom: 0,
            containLabel: true,
        },
        legend: {
            itemWidth: 6,
            itemHeight: 6,
            textStyle: {
                 color: "#B7BCBB",
            }
        },
        series: {
            type: 'bar',
            barWidth: 30,
            label: {
                textStyle: {
                    color: 'rgba(240,240,240,0.7)',
                }
            },
        }
    }

    constructor(option) {
        super({...option, _depthMixin: true});
        return this
    }
}